<template>
  <div class="nav-item">
    <a href="javascript:;"
      :class="['item-lk',{'active':index === curInd}]"
       @click="clickNavItem(index)"
    >{{item.field_name}}</a>
  </div>
</template>

<script>
  export default {
      name:"navItem",
      props:{
          item:Object,
          index:Number,
          curInd:Number
      },
      methods:{
          clickNavItem(ind){
              this.$emit("clickNavItem",ind)
          }
      }
  }
</script>

<style scoped>
  .nav-item{
    display: inline-block;
    margin: 0 20px;
  }
  .nav-item .active{
    color:blue;
  }
</style>
